package com;

import java.net.MalformedURLException;
import java.net.URL;

import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.HtmlEmail;

public class test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/*File f = new File("C:\\Users\\Administrator\\Desktop\\email") ;
		File[] arr = f.listFiles() ;
		for(int i =0 ; i<arr.length ; i++){
			File ff = arr[i];
			ff.renameTo(new File("C:\\Users\\Administrator\\Desktop\\email2\\"+(i+1)+".jpg")) ;
		}*/
		HtmlEmail email = new HtmlEmail();
		try {
			URL url = new URL("http://localhost/web/assets/images/email/2.jpg");
			String cid = email.embed(url, "11") ;//hxlawzouix
			System.out.println(cid);
			//<img src='cid:'>
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (EmailException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
